home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / ultra250.zip / UW_TUT10.C < prev    next >
Text File  |  1992-11-02  |  22KB  |  531 lines

  1. /****************************************************************************/
  2. /* UW_TUT10.C                                                               */
  3. /*                                                                          */
  4. /* NOTE: THIS FILE IS PUBLIC DOMAIN AND MAY BE MODIFIED AND USED AT WILL    */
  5. /*                                                                          */
  6. /* Now we add the finishing touch - context sensitive help using the        */
  7. /* UltraWin/InTUItion help engine, which we call by using the "C" system    */
  8. /* call.  The help engine is created with InTUItion and requires the        */
  9. /* InTUItion libraries to make this a linkable part of your program.        */
  10. /* However, as you will see, we can call the stand-alone help program to    */
  11. /* take full advantage of this hypertext help system!                       */
  12. /*                                                                          */
  13. /*                                                         Dr. Boyd Gafford */
  14. /*                                                         Kevin Huck       */
  15. /*                                                         EnQue Software   */
  16. /*                                                         09/16/92         */
  17. /****************************************************************************/
  18. #include <stdio.h>
  19. #include <fcntl.h>
  20. #include <io.h>
  21. #ifndef __TURBOC__
  22. #include <sys\types.h>
  23. #endif
  24. #include <sys\stat.h>
  25. #include <time.h>
  26. #include <ctype.h>
  27. #include "uw.h"                           /* include the necessary headers  */
  28.  
  29. #define MAX_CUST 50
  30.  
  31. typedef struct cust
  32. {
  33.   int status;
  34.   int cust_no;
  35.   char business[34];
  36.   char name[34];
  37.   char addr[34];
  38.   char city[34];
  39.   char state[4];
  40.   char zip[10];
  41.   char phone[16];
  42.   char fax[16];
  43.   char date[10];
  44.   char memo[34];
  45.   char unused[26];                                /* round out to 256 bytes */
  46. } CUST;
  47.  
  48. /*----------------------- global window variables --------------------------*/
  49. WINDOW   Desk_wn, Window1;
  50. CUST Customers[MAX_CUST];
  51. char Fname[33];
  52.  
  53. MENU    Top_menu, *Top_mnp = &Top_menu;
  54. MENU    Files_menu, Edit_menu, Print_menu;
  55. MENU    *Drop_mnps[3];
  56.  
  57. PRINT   Print;
  58.  
  59. /*-------------------------------- prototypes ------------------------------*/
  60. int disp_time(void);
  61. void disp_cust(CUST *cp, WINDOW *wnp);
  62. int file_load(CUST *customers);
  63. int file_save(CUST *customers);
  64. int get_fname(char *fname);
  65. void print_cust(CUST *cp, PRINT *p);
  66. void do_external_help( char *cmd );
  67.  
  68. /*********/
  69. /* ~main */
  70. /*       ********************************************************************/
  71. /*  Demonstrate data entry capability...                                    */
  72. /****************************************************************************/
  73. int main()
  74. {
  75.   int i, ret_val, cust = 0, end_flag = 0, print_stat = 0;
  76.   char *search, buff[81];
  77.   WINDOW *wnp;
  78.   CUST *cp;
  79.   uchar back_att  = (LIGHTGRAY << 4) | BLACK,
  80.         bdr_att   = (LIGHTGRAY << 4) | BLACK,
  81.         csr_att   = (CYAN << 4) | YELLOW,
  82.         first_att = (LIGHTGRAY << 4) | RED;
  83.  
  84.   wnp = &Window1;                         /* set local window pointer       */
  85.   init_video(80, 25);                     /* init video for 80 x 25 screen  */
  86.   init_clock(0x3333);                     /* init clock irq at 91 tics/sec  */
  87.   init_mouse();                           /* init mouse if available        */
  88.  
  89.   wn_create(0, 0, V_cols-1, V_rows-1, NO_BDR, WN_NORMAL, &Desk_wn);
  90.   link_window(&Desk_wn);
  91.  
  92.   /*------------------------ create the menu system ------------------------*/
  93.   Drop_mnps[0] = &Files_menu;
  94.   Drop_mnps[1] = &Edit_menu;
  95.   Drop_mnps[2] = &Print_menu;
  96.  
  97.   menu_create(0, 0, V_cols - 1, 0, M_HORIZONTAL,
  98.               back_att, bdr_att, csr_att, first_att,
  99.               NO_BDR, WN_NORMAL, Top_mnp);
  100.   item_add( "   Files   ", 1, 3, &Top_menu );
  101.   item_add( "   Edit    ", 2, 3, &Top_menu );
  102.   item_add( "   Print   ", 8, 3, &Top_menu );
  103.  
  104.   menu_create(0, 1, 14, 5, M_VERTICAL,
  105.     back_att, bdr_att, csr_att, first_att,
  106.     SGL_BDR, WN_NORMAL, Drop_mnps[0]);
  107.   item_add( " Load File", 4, 1, &Files_menu );
  108.   item_add( " Save File", 5, 1, &Files_menu );
  109.   item_add( "   Quit   ", 3, 3, &Files_menu );
  110.  
  111.   menu_create(11, 1, 32, 4, M_VERTICAL,
  112.     back_att, bdr_att, csr_att, first_att,
  113.     SGL_BDR, WN_NORMAL, Drop_mnps[1]);
  114.   item_add( " Clear Current", 6, 7, &Edit_menu );
  115.   item_add( " Clear All    ", 7, 7, &Edit_menu );
  116.  
  117.   menu_create(22, 1, 43, 4, M_VERTICAL,
  118.     back_att, bdr_att, csr_att, first_att,
  119.     SGL_BDR, WN_NORMAL, Drop_mnps[2]);
  120.   item_add( " Print Current", 9, 7, &Print_menu );
  121.   item_add( " Print All    ", 10, 7, &Print_menu );
  122.  
  123.   set_idle_func(disp_time);               /* set background clock function  */
  124.  
  125.   wn_create(5, 5, 75, 20, SLD_BDR, WN_POPUP, wnp);
  126.   wn_color(YELLOW, BLUE, wnp);            /* change the window colors       */
  127.   wn_bdr_color(WHITE, BLUE, wnp);         /* change the border's colors     */
  128.   link_window(wnp);
  129.  
  130.   /*-------------- initialize first customer as EnQue Software --------------*/
  131.   cp = &Customers[0];
  132.   strcpy(cp->business, "EnQue Software"); 
  133.   strcpy(cp->name, "Kevin Huck & Boyd Gafford");  
  134.   strcpy(cp->addr, "Rt. 1 Box 116C"); 
  135.   strcpy(cp->city, "Pleasant Hill");  
  136.   strcpy(cp->state, "MO");  
  137.   strcpy(cp->zip, "64080"); 
  138.   strcpy(cp->phone, "(816)987-2515"); 
  139.   strcpy(cp->fax, "(816)987-2515");      
  140.   strcpy(cp->date, "09/11/92");      
  141.   strcpy(cp->memo, "BBS 816-358-8990"); 
  142.  
  143.   /*------------------------ initialize the printer ------------------------*/
  144.   if( init_printer("LPT1", NULL, 2048L, 2048L, &Print) )
  145.     print_stat = 1;
  146.  
  147.   Top_mnp->csr_pos = M_MAX_ENTRIES;    /* set to prevent menu from hiliting */
  148.   menu_set(Top_mnp);          /* on entry, since menu is not active until   */
  149.   Top_mnp->csr_pos = 0;       /* Alt-F, Alt-E, or Alt-P is hit              */
  150.  
  151.   wn_color(LIGHTGRAY, RED, &Desk_wn);
  152.   wn_plst(CENTERED, 3, "Use cursor keypad to select customer", &Desk_wn);
  153.   wn_plst(CENTERED, 4, "or click on cursor buttons at bottom of screen", &Desk_wn);
  154.   wn_plst(CENTERED, 21, "<Up> <Dn>  <PgUp> <PgDn>  <Home> <End>", &Desk_wn);
  155.   wn_plst(CENTERED, 22, "<<< Press Alt-H or click on desired item for help >>>", &Desk_wn);
  156.   wn_color(YELLOW, RED, &Desk_wn);
  157.   while(!end_flag)
  158.   {
  159.     cp = &Customers[cust];
  160.     mv_cs(1,1, wnp);
  161.     wn_printf(wnp, "Customer:%3d", cust+1);
  162.     disp_cust(cp, wnp);
  163.     m_show();
  164.     wait_event();
  165.     m_hide();
  166.     search = NULL;
  167.     if( Event.is_mouse )                            /* process mouse action */
  168.     {
  169.       if( range(0,Event.m_x,11) && (Event.m_y == 0) )
  170.         Event.key = KEY_ALT_F, search = "///File";
  171.       else if( range(11,Event.m_x,22) && (Event.m_y == 0) )
  172.         Event.key = KEY_ALT_E, search = "///Edit";
  173.       else if( range(22,Event.m_x,33) && (Event.m_y == 0) )
  174.         Event.key = KEY_ALT_P, search = "///Print";
  175.  
  176.       else if( range( 7,Event.m_x,47) && (Event.m_y == 9) )
  177.         Event.key = 'B', search = "///Business";
  178.       else if( range( 7,Event.m_x,47) && (Event.m_y == 10) )
  179.         Event.key = 'N', search = "///Name";
  180.       else if( range( 7,Event.m_x,47) && (Event.m_y == 11) )
  181.         Event.key = 'A', search = "///Address";
  182.       else if( range( 7,Event.m_x,47) && (Event.m_y == 12) )
  183.         Event.key = 'C', search = "///City";
  184.       else if( range(50,Event.m_x,59) && (Event.m_y == 12) )
  185.         Event.key = 'S', search = "///State";
  186.       else if( range(61,Event.m_x,71) && (Event.m_y == 12) )
  187.         Event.key = 'Z', search = "///Zip";
  188.       else if( range( 7,Event.m_x,47) && (Event.m_y == 13) )
  189.         Event.key = 'P', search = "///Phone";
  190.       else if( range( 7,Event.m_x,47) && (Event.m_y == 14) )
  191.         Event.key = 'F', search = "///Fax";
  192.       else if( range( 7,Event.m_x,47) && (Event.m_y == 15) )
  193.         Event.key = 'D', search = "///Date";
  194.       else if( range( 7,Event.m_x,47) && (Event.m_y == 16) )
  195.         Event.key = 'M', search = "///Memo";
  196.  
  197.       else if( range( 21,Event.m_x,24) && (Event.m_y == 21) )
  198.         Event.key = KEY_UP, search = "///Cursor";
  199.       else if( range( 26,Event.m_x,29) && (Event.m_y == 21) )
  200.         Event.key = KEY_DN, search = "///Cursor";
  201.       else if( range( 32,Event.m_x,37) && (Event.m_y == 21) )
  202.         Event.key = KEY_PGUP, search = "///Cursor";
  203.       else if( range( 39,Event.m_x,44) && (Event.m_y == 21) )
  204.         Event.key = KEY_PGDN, search = "///Cursor";
  205.       else if( range( 47,Event.m_x,52) && (Event.m_y == 21) )
  206.         Event.key = KEY_HOME, search = "///Cursor";
  207.       else if( range( 54,Event.m_x,58) && (Event.m_y == 21) )
  208.         Event.key = KEY_END, search = "///Cursor";
  209.  
  210.       else if( range( 19,Event.m_x,60) && (Event.m_y == 22) )
  211.         Event.key = KEY_ALT_H;
  212.       else
  213.         Event.key = 0;              /* set to 0 so no processing occurs     */
  214.  
  215.       if( (Event.m_button == RB) && (search != NULL) )  /*need to call help?*/
  216.       {     
  217.         sprintf(buff, "enqhelp tutor.hlp 0 %s 2 3 78 21", search);
  218.         do_external_help(buff);
  219.         Event.key = 0;              /* prevent processing of selected item  */
  220.       }
  221.     }
  222.     switch(Event.key)
  223.     {
  224.       /*------------------------- process help -----------------------------*/
  225.       case KEY_ALT_H:                                       /* pull up help */
  226.         do_external_help("enqhelp tutor.hlp 0 0 2 3 78 21");
  227.         break;
  228.       /*------------------------- process menus ----------------------------*/
  229.       case KEY_ALT_Q:                                       /* quit program */
  230.         end_flag = 1;
  231.         break;
  232.       case KEY_ALT_F: case KEY_ALT_E: case KEY_ALT_P:
  233.         m_show();
  234.         if( Event.key == KEY_ALT_F )
  235.           ret_val = menu_system_ll(&Top_menu,&Drop_mnps[0],0,'F',M_EXIT_ON_ESC);
  236.         else if( Event.key == KEY_ALT_E )
  237.           ret_val = menu_system_ll(&Top_menu,&Drop_mnps[0],0,'E',M_EXIT_ON_ESC);
  238.         else
  239.           ret_val = menu_system_ll(&Top_menu,&Drop_mnps[0],0,'P',M_EXIT_ON_ESC);
  240.         switch( ret_val )
  241.         {
  242.           case 3:                                           /* quit program */
  243.             end_flag = 1;
  244.             break;
  245.           case 4:                                           /* load file    */
  246.             file_load(Customers);
  247.             break;
  248.           case 5:                                           /* save file    */
  249.             file_save(Customers);
  250.             break;
  251.           case 6:                                           /* clear one    */
  252.             setmem(cp, sizeof(CUST), 0);
  253.             break;
  254.           case 7:                                           /* clear all    */
  255.             setmem(Customers, sizeof(Customers), 0);
  256.             break;
  257.           case 9:                                           /* print one    */
  258.             if( print_stat )
  259.               print_cust(cp, &Print);
  260.             break;
  261.           case 10:                                          /* print all    */
  262.             if( print_stat )
  263.               for( i = 0; i < MAX_CUST; i++ )
  264.                 if( strlen(Customers[i].name) )             /* not empty?   */
  265.                   print_cust(&Customers[i], &Print);
  266.             break;
  267.         }
  268.         break;
  269.       /*---------------------- process cursor keys -------------------------*/
  270.       case KEY_HOME:
  271.         cust = 0;
  272.         break; 
  273.       case KEY_END:
  274.         cust = MAX_CUST-1;
  275.         break; 
  276.       case KEY_DN: 
  277.         if( cust < MAX_CUST-1 )
  278.           cust++;
  279.         break;
  280.       case KEY_UP: 
  281.         if( cust > 0 )
  282.           cust--;
  283.         break;
  284.       case KEY_PGUP: 
  285.         if( cust >= 10 )
  286.           cust -= 10;
  287.         else
  288.           cust = 0;
  289.         break;
  290.       case KEY_PGDN: 
  291.         if( cust < MAX_CUST-11 )
  292.           cust += 10;
  293.         else
  294.           cust = MAX_CUST-1;
  295.         break;
  296.       /*-------------------- process field edit keys -----------------------*/
  297.       case 'b': case 'B':                         /* get new business name  */
  298.         mv_cs( 11, 3, wnp);
  299.         wn_gets_ll(cp->business, "________________________________",
  300.                                  "********************************",
  301.           swap_nibbles(wnp->att), G_UP_FST_CHAR2 | G_STRIP_END, 32, wnp);
  302.         break;
  303.       case 'n': case 'N':                         /* get new contact name   */
  304.         mv_cs( 11, 4, wnp);
  305.         wn_gets_ll(cp->name, "________________________________",
  306.                              "********************************",
  307.           swap_nibbles(wnp->att), G_UP_FST_CHAR2 | G_STRIP_END, 32, wnp);
  308.         break;
  309.       case 'a': case 'A':                         /* get new address        */
  310.         mv_cs( 11, 5, wnp);
  311.         wn_gets_ll(cp->addr, "________________________________",
  312.                              "********************************",
  313.           swap_nibbles(wnp->att), G_UP_FST_CHAR2 | G_STRIP_END, 32, wnp);
  314.         break;
  315.       case 'c': case 'C':                         /* get new city           */
  316.         mv_cs( 11, 6, wnp);
  317.         wn_gets_ll(cp->city, "________________________________",
  318.                              "********************************",
  319.           swap_nibbles(wnp->att), G_UP_FST_CHAR2 | G_STRIP_END, 32, wnp);
  320.         break;
  321.       case 's': case 'S':                         /* get new state          */
  322.         mv_cs( 51, 6, wnp);
  323.         wn_gets_ll(cp->state, "__", "UU",
  324.           swap_nibbles(wnp->att), G_EXIT_ON_FILL|G_STRIP_END, 2, wnp);
  325.         break;
  326.       case 'z': case 'Z':                         /* get new zip            */
  327.         mv_cs( 60, 6, wnp);
  328.         wn_gets_ll(cp->zip, "_____", "#####",
  329.           swap_nibbles(wnp->att), G_EXIT_ON_FILL|G_STRIP_END, 5, wnp);
  330.         break;
  331.       case 'p': case 'P':                         /* get new phone number   */
  332.         mv_cs( 11, 7, wnp);
  333.         wn_gets_ll(cp->phone, "(___)___-____", " ### ### ####",
  334.           swap_nibbles(wnp->att), G_EXIT_ON_FILL, 14, wnp);
  335.         break;                    
  336.       case 'f': case 'F':                         /* get new fax number     */
  337.         mv_cs( 11, 8, wnp);
  338.         wn_gets_ll(cp->fax, "(___)___-____", " ### ### ####",
  339.           swap_nibbles(wnp->att), G_EXIT_ON_FILL, 14, wnp);
  340.         break;
  341.       case 'd': case 'D':                         /* get new date           */
  342.         mv_cs( 11, 9, wnp);
  343.         wn_gets_ll(cp->date, "__/__/__", "## ## ##", swap_nibbles(wnp->att),
  344.           G_EXIT_ON_FILL, 8, wnp);
  345.         break;
  346.       case 'm': case 'M':                         /* get new memo field     */
  347.         mv_cs( 11, 10, wnp);
  348.         wn_gets_ll(cp->memo, "________________________________",
  349.                              "********************************",
  350.           swap_nibbles(wnp->att), G_STRIP_END, 32, wnp);
  351.         break;
  352.  
  353.     }
  354.   }
  355.  
  356.   unlink_window(wnp);                     /* remove the window from screen  */
  357.   wn_destroy(wnp);
  358.   set_idle_func(NULL);                    /* remove background function     */
  359.   unlink_window(&Desk_wn);                /* remove the window from screen  */
  360.   wn_destroy(&Desk_wn);
  361.   end_clock();
  362.   end_video();                            /* clean up before we exit        */
  363.   end_printer(&Print);
  364.   end_mouse();
  365.   return(1);
  366. }
  367. /*** end of main ***/
  368.  
  369. /**************/
  370. /* ~disp_time */
  371. /*            ***************************************************************/
  372. /*  This routine is called in the background by wait_event and will display */
  373. /*  the time once per second.  Notice the use of the global variables       */
  374. /*  Uw_timers.  There is an array of four "countdown" timers that are user  */
  375. /*  accessible.  Each "timer tic" will decrement the counts by one, until   */
  376. /*  0 is reached.  By "reloading" the timer with "Tics_per_sec", we only    */
  377. /*  display the time of day once per second.  "Tics_per_sec" is set         */
  378. /*  by init_clock.                                                          */
  379. /****************************************************************************/
  380. int disp_time(void)
  381. {
  382.   time_t t;
  383.   print_in_bkgrnd();                            /* call this to print       */
  384.   if( !Uw_timers[0] )                           /* has one second passed?   */
  385.   {
  386.     Uw_timers[0] = Tics_per_sec;                /* if so, reload timer      */
  387.     t = time(NULL);                             /* get time                 */
  388.     mv_cs(55, V_rows-1, &Desk_wn);              /* move window cursor       */
  389.     wn_st_qty(ctime(&t), 24, &Desk_wn);         /* output 24 characters     */
  390.     return(1);
  391.   }
  392.   return(0);
  393. }
  394. /*** end of disp_time ***/
  395.  
  396. /**************/
  397. /* ~disp_cust */
  398. /*            ***************************************************************/
  399. /*  This routine displays a customer in the desired window...               */
  400. /****************************************************************************/
  401. void disp_cust(CUST *cp, WINDOW *wnp)
  402. {
  403.   int r = 3;
  404.  
  405.   mv_cs( 1, r++, wnp );
  406.   wn_printf( wnp, "Business: %-32s", cp->business);
  407.   mv_cs( 1, r++, wnp );
  408.   wn_printf( wnp, "Name    : %-32s", cp->name );
  409.   mv_cs( 1, r++, wnp );
  410.   wn_printf( wnp, "Address : %-32s", cp->addr );
  411.   mv_cs( 1, r++, wnp );
  412.   wn_printf( wnp, "City    : %-32s State: %2s  Zip: %5s",
  413.     cp->city, cp->state, cp->zip );
  414.   wn_cleol(wnp);                                    /* clear to end of line */
  415.   mv_cs( 1, r++, wnp );
  416.   wn_printf( wnp, "Phone   : %-16s", cp->phone );
  417.   mv_cs( 1, r++, wnp );
  418.   wn_printf( wnp, "Fax     : %-16s", cp->fax );
  419.   mv_cs( 1, r++, wnp );
  420.   wn_printf( wnp, "Date    : %-10s", cp->date );
  421.   mv_cs( 1, r++, wnp );
  422.   wn_printf( wnp, "Memo    : %-32s", cp->memo );
  423. }
  424. /*** end of disp_cust ***/
  425.  
  426. /**************/
  427. /* ~file_load */
  428. /*            ***************************************************************/
  429. /*  This routine loads a file from disk into the customer array...          */
  430. /****************************************************************************/
  431. int file_load(CUST *customers)
  432. {
  433.   FILE *fp;
  434.   
  435.   if( get_fname(Fname) )
  436.   {
  437.     if( (fp = fopen(Fname, "rb")) != NULL )
  438.     {
  439.       fread(customers, sizeof(CUST), MAX_CUST, fp);
  440.       fclose(fp);
  441.       tone(1024,10);
  442.       return(1);
  443.     }
  444.   }
  445.   return(0);
  446. }
  447. /*** end of file_load ***/
  448.  
  449. /**************/
  450. /* ~file_save */
  451. /*            ***************************************************************/
  452. /*  This routine saves a file to disk from the customer array...            */
  453. /****************************************************************************/
  454. int file_save(CUST *customers)
  455. {
  456.   FILE *fp;
  457.   
  458.   if( get_fname(Fname) )
  459.   {
  460.     if( (fp = fopen(Fname, "wb")) != NULL )
  461.     {
  462.       fwrite(customers, sizeof(CUST), MAX_CUST, fp);
  463.       fclose(fp);
  464.       tone(1024,10);
  465.       return(1);
  466.     }
  467.   }
  468.   return(0);
  469. }
  470. /*** end of file_load ***/
  471.  
  472. /**************/
  473. /* ~get_fname */
  474. /*            ***************************************************************/
  475. /*  This routine prompts the user for a filename using a popup window...    */
  476. /****************************************************************************/
  477. int get_fname(char *fname)
  478. {
  479.   int ret_val = 1;
  480.   WINDOW wn;
  481.   
  482.   wn_create(20, 8, 60, 10, SLD_BDR, WN_POPUP, &wn);
  483.   wn_set(&wn);
  484.   wn_plst(4, 0, "Enter filename:", &wn);
  485.   if( wn_gets_ll(fname, "____________", "************",
  486.       swap_nibbles(wn.att), G_STRIP_END, 12, &wn) == KEY_ESC )
  487.     ret_val = 0;
  488.   wn_destroy(&wn);
  489.   return(ret_val);
  490. }
  491. /*** end of get_fname ***/
  492.  
  493. /***************/
  494. /* ~print_cust */
  495. /*             **************************************************************/
  496. /*  This routine prints a customer in the desired window...                 */
  497. /****************************************************************************/
  498. void print_cust(CUST *cp, PRINT *p)
  499. {
  500.   print_printf( p, "Business: %-32s\r\n", cp->business);
  501.   print_printf( p, "Name    : %-32s\r\n", cp->name );
  502.   print_printf( p, "Address : %-32s\r\n", cp->addr );
  503.   print_printf( p, "City    : %-32s State: %2s  Zip: %5s\r\n",
  504.     cp->city, cp->state, cp->zip );
  505.   print_printf( p, "Phone   : %-16s\r\n", cp->phone );
  506.   print_printf( p, "Fax     : %-16s\r\n", cp->fax );
  507.   print_printf( p, "Date    : %-10s\r\n", cp->date );
  508.   print_printf( p, "Memo    : %-32s\r\n", cp->memo );
  509.   print_char(12,p);                                     /* print form feed  */
  510. }
  511. /*** end of print_cust ***/
  512.  
  513. /*********************/
  514. /* ~do_external_help */
  515. /*                   ********************************************************/
  516. /*  Here we kill the mouse and clock so that the external ENQHELP.EXE       */
  517. /*  program can take them over, and call with the parameters passed!        */
  518. /****************************************************************************/
  519. void do_external_help( char *cmd )
  520. {
  521.   end_mouse();                                        /* release mouse      */
  522.   end_clock();                                        /* release timer      */
  523.   system(cmd);
  524.   init_clock(0x3333);                                 /* restart timer      */
  525.   init_mouse();                                       /* restart mouse      */
  526.   csr_hide();                                         /* hide hard cursor   */
  527. }
  528. /*** end of do_external_help ***/
  529.  
  530. /*** END OF FILE ***/
  531.